/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package mb.mbpart.memory;

import java.util.Date;
import mb.mbmiddle.MbPartMiddle;

/**
 *
 * @author thanh.nguyenchi
 */
public class QueryMemory {
    private String data;
    private Date queryTime;
    
    public QueryMemory(){        
    }
       
    /**
     * @return the data
     */
    public String getData() {
        return data;
    }

    /**
     * @param data the data to set
     */
    public void setData(String data) {
        this.data = data;
    }

    /**
     * @return the queryTime
     */
    public Date getQueryTime() {
        return queryTime;
    }

    /**
     * @param queryTime the queryTime to set
     */
    public void setQueryTime(Date queryTime) {
        this.queryTime = queryTime;
    }
    
    public boolean checkTime(){
        Date now = new Date();
        //diffMinutes 
        if (now.getTime() - queryTime.getTime() < MbPartMiddle.queryTime*(60 * 1000)) {
            return true;
        }
        else
            return false;
        
    }
    
    
}
